import React, { Component } from 'react'
import Count from './components/Count'
import store from './redux/store'

export default class App extends Component {
  componentDidMount(){
    //订阅store当数据发生改变时就通过this.setState({})触发render重新渲染页面
    store.subscribe(()=>{
      this.setState({})
    })
  }
  render() {
    return (
      <div>
        <Count/>
      </div>
    )
  }
}
